<?php
/**
 * 创客空间
 */
class HackerspaceApp extends CommonApp {
    //列表
    public function spaceAct(){
    	$result = self::getList('space');
    	self::assign_seo('space');
        //最热
        $result['hit'] = My::item2list('datas','space',array('pagesize'=>12,'publish'=>1,'order'=>'hot'));
        $this->assign('result',$result);
        $this->assign('type','space');
        $this->assign('locat',array('locat' => '创客空间','locat_en' => 'HACKERSPACE'));
        $this->display('Common/list');
    }
    //详情
    public function detailAct(){
        $id = I('get.id');
        if(!My::is_id($id))
            $this->ajaxReturn(404,'文章详情ID有误!');
        // $item = My::arr2var($_REQUEST,'item');
        $result = self::detail($id);
        $this->assign('result',$result);
        $this->assign('menu',self::menu($result['item']));
        $this->display('Common/detail');
    }
}